package pkg

import (
	"encoding/json"
	"github.com/Baidu-AIP/golang-sdk/aip/censor"
	"mouth-project/request"
)

//文本内容审核

func Baidu(content string) bool {
	client := censor.NewClient("I7Bw1F8q8zf8AzWP4nnVPpUI", "tnrf8E27gOs0zRyU1xYKCZrVLAfcij2f")
	res := client.TextCensor(content)
	var t request.T
	json.Unmarshal([]byte(res), &t)
	if t.Conclusion == "合规" {
		return true
	}
	return false
}
